#!/sbin/openrc-run

: ${cfgfile:="/etc/rezolus.toml"}
: ${logfile:="/var/log/rezolus.log"}
: ${command_user:="rezolus"}

command="/usr/bin/rezolus"
command_args="--config $cfgfile"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
output_log="$logfile"
error_log="$logfile"

required_files="$cfgfile"

start_pre() {
	checkpath -f -m 640 -o "$command_user" "$logfile"
}
